New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dyna-ui-dom-observer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dyna-ui-dom-observer

Dom observer with debounce protection

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
49
decreased by-14.04%
Maintainers
1
Weekly downloads
 
Created
Source

About

Detect dom changes with debounce protection.

Get all collected mutations in the meantime.

Written in Typescript, runs everywhere.

Usage

    // create your observer for your container
    const myOberver = new DynaDomObserver({
          rootNode: document.querySelector('#my-component'), 
          onChange: (mutations) => console.log('detected mutations', mutations);
    });

    // when you finish, clean it up
    myObserver.dispose();

Config

IDynaDomChangesConfig {
  rootNode?: Element;                               // optional, default is document.body
  detectChanges?: EChangeType[];                    // optional, default is [EChangeType.ATTR_CHANGE, EChangeType.SUB_NODES_CHANCES]
  debounceTime?: number;                            // optional, timeout in ms, triggers or 1st, debounces the rest, triggers each this timeout, default 300
  onChange: (mutations: MutationRecord[]) => void;  // required, triggers on change
}

Reference

Dom observer, this strange guy

FAQs

Package last updated on 10 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc